/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufrpe.bsi.dao;

import br.ufrpe.bsi.bean.Log;
import com.mysql.jdbc.PreparedStatement;
import java.sql.SQLException;

/**
 *
 * @author Daniel
 */

public class LogDAO extends Conexao{
    
    public void inserir(Log log) throws ClassNotFoundException, SQLException{
        String sql = "INSERT INTO log(login,acao,data) VALUES (?,?,?)";
        PreparedStatement ps = (PreparedStatement) getPreparedStatement(sql);
        ps.setString(1, log.getLogin());
        ps.setString(2, log.getAcao());
        ps.setString(3, log.getData().toString());
        ps.execute();
        ps.close();
    }
    
}
